<template>
  <div>
    <h1>欢迎来到indx页</h1>

    <input type="text" v-model="text" />
    {{ text }}
    <div>
      <span> 用params传过来的是{{ $route.params.name }} </span>
      <br />
      <span>
        传过来的name是
        {{ $route.query.name }}
      </span>
      <br />
      <span>
        传过来的age是
        {{ $route.query.age }}
      </span>
    </div>



    <ul>
        <li>
            <img src="" alt="">
            <span>

            </span>
        </li>
    </ul>
  </div>
</template>

<script>
import axios from "axios";
export default {
  data() {
    return {
      text: "hello",
    };
  },
  mounted() {
    console.log(this.$route.params);
    this.getData() 
  },
  created() {
    console.log(this.$route);
    let { name, age } = this.$route;

    console.log(this.$route.query);
  },
  methods: {
    getData() {
     axios.get('/https://840f52df-329a-455d-ae39-6a1a4128349f.bspapp.com/api/getHotCartoonList?type=1&changeData', {
    params: {
     Type,
     
    }
  })
        .then(res => {
          console.log(res);
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
};
</script>

<style lang="scss">
</style>